home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / u_man / cat1 / perllocale.z / perllocale
Text File  |  1998-10-30  |  49KB  |  991 lines

  1.  
  2.  
  3.  
  4. PPPPEEEERRRRLLLLLLLLOOOOCCCCAAAALLLLEEEE((((1111))))                                                    PPPPEEEERRRRLLLLLLLLOOOOCCCCAAAALLLLEEEE((((1111))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      perllocale - Perl locale handling (internationalization and localization)
  10.  
  11. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  12.      Perl supports language-specific notions of data such as "is this a
  13.      letter", "what is the uppercase equivalent of this letter", and "which of
  14.      these letters comes first".  These are important issues, especially for
  15.      languages other than English - but also for English: it would be very
  16.      naieve to think that A-Za-z defines all the "letters". Perl is also aware
  17.      that some character other than '.' may be preferred as a decimal point,
  18.      and that output date representations may be language-specific.  The
  19.      process of making an application take account of its users' preferences
  20.      in such matters is called iiiinnnntttteeeerrrrnnnnaaaattttiiiioooonnnnaaaalllliiiizzzzaaaattttiiiioooonnnn (often abbreviated as
  21.      iiii11118888nnnn); telling such an application about a particular set of preferences
  22.      is known as llllooooccccaaaalllliiiizzzzaaaattttiiiioooonnnn (llll11110000nnnn).
  23.  
  24.      Perl can understand language-specific data via the standardized (ISO C,
  25.      XPG4, POSIX 1.c) method called "the locale system". The locale system is
  26.      controlled per application using one pragma, one function call, and
  27.      several environment variables.
  28.  
  29.      NNNNOOOOTTTTEEEE: This feature is new in Perl 5.004, and does not apply unless an
  30.      application specifically requests it - see the section on _B_a_c_k_w_a_r_d
  31.      _c_o_m_p_a_t_i_b_i_l_i_t_y.  The one exception is that _w_r_i_t_e() now aaaallllwwwwaaaayyyyssss uses the
  32.      current locale - see the section on _N_O_T_E_S.
  33.  
  34. PPPPRRRREEEEPPPPAAAARRRRIIIINNNNGGGG TTTTOOOO UUUUSSSSEEEE LLLLOOOOCCCCAAAALLLLEEEESSSS
  35.      If Perl applications are to be able to understand and present your data
  36.      correctly according a locale of your choice, aaaallllllll of the following must be
  37.      true:
  38.  
  39.      +o   YYYYoooouuuurrrr ooooppppeeeerrrraaaattttiiiinnnngggg ssssyyyysssstttteeeemmmm mmmmuuuusssstttt ssssuuuuppppppppoooorrrrtttt tttthhhheeee llllooooccccaaaalllleeee ssssyyyysssstttteeeemmmm.  If it does,
  40.          you should find that the _s_e_t_l_o_c_a_l_e() function is a documented part of
  41.          its C library.
  42.  
  43.      +o   DDDDeeeeffffiiiinnnniiiittttiiiioooonnnnssss ffffoooorrrr tttthhhheeee llllooooccccaaaalllleeeessss wwwwhhhhiiiicccchhhh yyyyoooouuuu uuuusssseeee mmmmuuuusssstttt bbbbeeee iiiinnnnssssttttaaaalllllllleeeedddd.  You, or
  44.          your system administrator, must make sure that this is the case. The
  45.          available locales, the location in which they are kept, and the
  46.          manner in which they are installed, vary from system to system.  Some
  47.          systems provide only a few, hard-wired, locales, and do not allow
  48.          more to be added; others allow you to add "canned" locales provided
  49.          by the system supplier; still others allow you or the system
  50.          administrator to define and add arbitrary locales.  (You may have to
  51.          ask your supplier to provide canned locales which are not delivered
  52.          with your operating system.)  Read your system documentation for
  53.          further illumination.
  54.  
  55.      +o   PPPPeeeerrrrllll mmmmuuuusssstttt bbbbeeeelllliiiieeeevvvveeee tttthhhhaaaatttt tttthhhheeee llllooooccccaaaalllleeee ssssyyyysssstttteeeemmmm iiiissss ssssuuuuppppppppoooorrrrtttteeeedddd.  If it does,
  56.          perl -V:d_setlocale will say that the value for d_setlocale is
  57.          define.
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. PPPPEEEERRRRLLLLLLLLOOOOCCCCAAAALLLLEEEE((((1111))))                                                    PPPPEEEERRRRLLLLLLLLOOOOCCCCAAAALLLLEEEE((((1111))))
  71.  
  72.  
  73.  
  74.      If you want a Perl application to process and present your data according
  75.      to a particular locale, the application code should include the use
  76.      locale pragma (see the section on _T_h_e _u_s_e _l_o_c_a_l_e _p_r_a_g_m_a) where
  77.      appropriate, and aaaatttt lllleeeeaaaasssstttt oooonnnneeee of the following must be true:
  78.  
  79.      +o   TTTThhhheeee llllooooccccaaaalllleeee----ddddeeeetttteeeerrrrmmmmiiiinnnniiiinnnngggg eeeennnnvvvviiiirrrroooonnnnmmmmeeeennnntttt vvvvaaaarrrriiiiaaaabbbblllleeeessss ((((sssseeeeeeee tttthhhheeee sssseeeeccccttttiiiioooonnnn oooonnnn
  80.          _E_N_V_I_R_O_N_M_E_N_T) must be correctly set up, either by yourself, or by the
  81.          person who set up your system account, at the time the application is
  82.          started.
  83.  
  84.      +o   TTTThhhheeee aaaapppppppplllliiiiccccaaaattttiiiioooonnnn mmmmuuuusssstttt sssseeeetttt iiiittttssss oooowwwwnnnn llllooooccccaaaalllleeee using the method described in
  85.          the section on _T_h_e _s_e_t_l_o_c_a_l_e _f_u_n_c_t_i_o_n.
  86.  
  87. UUUUSSSSIIIINNNNGGGG LLLLOOOOCCCCAAAALLLLEEEESSSS
  88.      TTTThhhheeee uuuusssseeee llllooooccccaaaalllleeee pppprrrraaaaggggmmmmaaaa
  89.  
  90.      By default, Perl ignores the current locale.  The use locale pragma tells
  91.      Perl to use the current locale for some operations:
  92.  
  93.      +o   TTTThhhheeee ccccoooommmmppppaaaarrrriiiissssoooonnnn ooooppppeeeerrrraaaattttoooorrrrssss (lt, le, cmp, ge, and gt) and the POSIX
  94.          string collation functions _s_t_r_c_o_l_l() and _s_t_r_x_f_r_m() use LC_COLLATE.
  95.          _s_o_r_t() is also affected if it is used without an explicit comparison
  96.          function because it uses cmp by default.
  97.  
  98.          NNNNooootttteeee:::: eq and ne are unaffected by the locale: they always perform a
  99.          byte-by-byte comparison of their scalar operands.  What's more, if
  100.          cmp finds that its operands are equal according to the collation
  101.          sequence specified by the current locale, it goes on to perform a
  102.          byte-by-byte comparison, and only returns _0 (equal) if the operands
  103.          are bit-for-bit identical.  If you really want to know whether two
  104.          strings - which eq and cmp may consider different - are equal as far
  105.          as collation in the locale is concerned, see the discussion in the
  106.          section on _C_a_t_e_g_o_r_y _L_C__C_O_L_L_A_T_E: _C_o_l_l_a_t_i_o_n.
  107.  
  108.      +o   RRRReeeegggguuuullllaaaarrrr eeeexxxxpppprrrreeeessssssssiiiioooonnnnssss aaaannnndddd ccccaaaasssseeee----mmmmooooddddiiiiffffiiiiccccaaaattttiiiioooonnnn ffffuuuunnnnccccttttiiiioooonnnnssss (_u_c(), _l_c(),
  109.          _u_c_f_i_r_s_t(), and _l_c_f_i_r_s_t()) use LC_CTYPE
  110.  
  111.      +o   TTTThhhheeee ffffoooorrrrmmmmaaaattttttttiiiinnnngggg ffffuuuunnnnccccttttiiiioooonnnnssss (_p_r_i_n_t_f(), _s_p_r_i_n_t_f() and _w_r_i_t_e()) use
  112.          LC_NUMERIC
  113.  
  114.      +o   TTTThhhheeee PPPPOOOOSSSSIIIIXXXX ddddaaaatttteeee ffffoooorrrrmmmmaaaattttttttiiiinnnngggg ffffuuuunnnnccccttttiiiioooonnnn (_s_t_r_f_t_i_m_e()) uses LC_TIME.
  115.  
  116.      LC_COLLATE, LC_CTYPE, and so on, are discussed further in the section on
  117.      _L_O_C_A_L_E _C_A_T_E_G_O_R_I_E_S.
  118.  
  119.      The default behavior returns with no locale or on reaching the end of the
  120.      enclosing block.
  121.  
  122.      Note that the string result of any operation that uses locale information
  123.      is tainted, as it is possible for a locale to be untrustworthy.  See the
  124.      section on _S_E_C_U_R_I_T_Y.
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. PPPPEEEERRRRLLLLLLLLOOOOCCCCAAAALLLLEEEE((((1111))))                                                    PPPPEEEERRRRLLLLLLLLOOOOCCCCAAAALLLLEEEE((((1111))))
  137.  
  138.  
  139.  
  140.      TTTThhhheeee sssseeeettttllllooooccccaaaalllleeee ffffuuuunnnnccccttttiiiioooonnnn
  141.  
  142.      You can switch locales as often as you wish at run time with the
  143.      _P_O_S_I_X::_s_e_t_l_o_c_a_l_e() function:
  144.  
  145.              # This functionality not usable prior to Perl 5.004
  146.              require 5.004;
  147.  
  148.              # Import locale-handling tool set from POSIX module.
  149.              # This example uses: setlocale -- the function call
  150.              #                    LC_CTYPE -- explained below
  151.              use POSIX qw(locale_h);
  152.  
  153.              # query and save the old locale
  154.              $old_locale = setlocale(LC_CTYPE);
  155.  
  156.              setlocale(LC_CTYPE, "fr_CA.ISO8859-1");
  157.              # LC_CTYPE now in locale "French, Canada, codeset ISO 8859-1"
  158.  
  159.              setlocale(LC_CTYPE, "");
  160.              # LC_CTYPE now reset to default defined by LC_ALL/LC_CTYPE/LANG
  161.              # environment variables.  See below for documentation.
  162.  
  163.              # restore the old locale
  164.              setlocale(LC_CTYPE, $old_locale);
  165.  
  166.      The first argument of _s_e_t_l_o_c_a_l_e() gives the ccccaaaatttteeeeggggoooorrrryyyy, the second the
  167.      llllooooccccaaaalllleeee.  The category tells in what aspect of data processing you want to
  168.      apply locale-specific rules.  Category names are discussed in the section
  169.      on _L_O_C_A_L_E _C_A_T_E_G_O_R_I_E_S and the section on _E_N_V_I_R_O_N_M_E_N_T.  The locale is the
  170.      name of a collection of customization information corresponding to a
  171.      particular combination of language, country or territory, and codeset.
  172.      Read on for hints on the naming of locales: not all systems name locales
  173.      as in the example.
  174.  
  175.      If no second argument is provided, the function returns a string naming
  176.      the current locale for the category.  You can use this value as the
  177.      second argument in a subsequent call to _s_e_t_l_o_c_a_l_e().  If a second
  178.      argument is given and it corresponds to a valid locale, the locale for
  179.      the category is set to that value, and the function returns the now-
  180.      current locale value.  You can use this in a subsequent call to
  181.      _s_e_t_l_o_c_a_l_e().  (In some implementations, the return value may sometimes
  182.      differ from the value you gave as the second argument - think of it as an
  183.      alias for the value that you gave.)
  184.  
  185.      As the example shows, if the second argument is an empty string, the
  186.      category's locale is returned to the default specified by the
  187.      corresponding environment variables.  Generally, this results in a return
  188.      to the default which was in force when Perl started up: changes to the
  189.      environment made by the application after startup may or may not be
  190.      noticed, depending on the implementation of your system's C library.
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. PPPPEEEERRRRLLLLLLLLOOOOCCCCAAAALLLLEEEE((((1111))))                                                    PPPPEEEERRRRLLLLLLLLOOOOCCCCAAAALLLLEEEE((((1111))))
  203.  
  204.  
  205.  
  206.      If the second argument does not correspond to a valid locale, the locale
  207.      for the category is not changed, and the function returns _u_n_d_e_f.
  208.  
  209.      For further information about the categories, consult the _s_e_t_l_o_c_a_l_e(_3)
  210.      manpage.  For the locales available in your system, also consult the
  211.      _s_e_t_l_o_c_a_l_e(_3) manpage and see whether it leads you to the list of the
  212.      available locales (search for the _S_E_E _A_L_S_O section).  If that fails, try
  213.      the following command lines:
  214.  
  215.              locale -a
  216.  
  217.              nlsinfo
  218.  
  219.              ls /usr/lib/nls/loc
  220.  
  221.              ls /usr/lib/locale
  222.  
  223.              ls /usr/lib/nls
  224.  
  225.      and see whether they list something resembling these
  226.  
  227.              en_US.ISO8859-1     de_DE.ISO8859-1     ru_RU.ISO8859-5
  228.              en_US               de_DE               ru_RU
  229.              en                  de                  ru
  230.              english             german              russian
  231.              english.iso88591    german.iso88591     russian.iso88595
  232.  
  233.      Sadly, even though the calling interface for _s_e_t_l_o_c_a_l_e() has been
  234.      standardized, the names of the locales and the directories where the
  235.      configuration is, have not.  The basic form of the name is
  236.      _l_a_n_g_u_a_g_e__c_o_u_n_t_r_y/_t_e_r_r_i_t_o_r_y...._c_o_d_e_s_e_t, but the latter parts are not always
  237.      present.
  238.  
  239.      Two special locales are worth particular mention: "C" and "POSIX".
  240.      Currently these are effectively the same locale: the difference is mainly
  241.      that the first one is defined by the C standard and the second by the
  242.      POSIX standard.  What they define is the ddddeeeeffffaaaauuuulllltttt llllooooccccaaaalllleeee in which every
  243.      program starts in the absence of locale information in its environment.
  244.      (The default default locale, if you will.)  Its language is (American)
  245.      English and its character codeset ASCII.
  246.  
  247.      NNNNOOOOTTTTEEEE: Not all systems have the "POSIX" locale (not all systems are
  248.      POSIX-conformant), so use "C" when you need explicitly to specify this
  249.      default locale.
  250.  
  251.      TTTThhhheeee llllooooccccaaaalllleeeeccccoooonnnnvvvv ffffuuuunnnnccccttttiiiioooonnnn
  252.  
  253.      The _P_O_S_I_X::_l_o_c_a_l_e_c_o_n_v() function allows you to get particulars of the
  254.      locale-dependent numeric formatting information specified by the current
  255.      LC_NUMERIC and LC_MONETARY locales.  (If you just want the name of the
  256.      current locale for a particular category, use _P_O_S_I_X::_s_e_t_l_o_c_a_l_e() with a
  257.      single parameter - see the section on _T_h_e _s_e_t_l_o_c_a_l_e _f_u_n_c_t_i_o_n.)
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. PPPPEEEERRRRLLLLLLLLOOOOCCCCAAAALLLLEEEE((((1111))))                                                    PPPPEEEERRRRLLLLLLLLOOOOCCCCAAAALLLLEEEE((((1111))))
  269.  
  270.  
  271.  
  272.              use POSIX qw(locale_h);
  273.  
  274.              # Get a reference to a hash of locale-dependent info
  275.              $locale_values = localeconv();
  276.  
  277.              # Output sorted list of the values
  278.              for (sort keys %$locale_values) {
  279.                  printf "%-20s = %s\n", $_, $locale_values->{$_}
  280.              }
  281.  
  282.      _l_o_c_a_l_e_c_o_n_v() takes no arguments, and returns aaaa rrrreeeeffffeeeerrrreeeennnncccceeee ttttoooo a hash.  The
  283.      keys of this hash are formatting variable names such as decimal_point and
  284.      thousands_sep; the values are the corresponding values.  See the
  285.      localeconv entry in the _P_O_S_I_X (_3) manpage for a longer example, which
  286.      lists all the categories an implementation might be expected to provide;
  287.      some provide more and others fewer, however.  Note that you don't need
  288.      use locale: as a function with the job of querying the locale,
  289.      _l_o_c_a_l_e_c_o_n_v() always observes the current locale.
  290.  
  291.      Here's a simple-minded example program which rewrites its command line
  292.      parameters as integers formatted correctly in the current locale:
  293.  
  294.              # See comments in previous example
  295.              require 5.004;
  296.              use POSIX qw(locale_h);
  297.  
  298.              # Get some of locale's numeric formatting parameters
  299.              my ($thousands_sep, $grouping) =
  300.                   @{localeconv()}{'thousands_sep', 'grouping'};
  301.  
  302.              # Apply defaults if values are missing
  303.              $thousands_sep = ',' unless $thousands_sep;
  304.              $grouping = 3 unless $grouping;
  305.  
  306.              # Format command line params for current locale
  307.              for (@ARGV) {
  308.                  $_ = int;    # Chop non-integer part
  309.                  1 while
  310.                  s/(\d)(\d{$grouping}($|$thousands_sep))/$1$thousands_sep$2/;
  311.                  print "$_";
  312.              }
  313.              print "\n";
  314.  
  315.  
  316. LLLLOOOOCCCCAAAALLLLEEEE CCCCAAAATTTTEEEEGGGGOOOORRRRIIIIEEEESSSS
  317.      The subsections which follow describe basic locale categories.  As well
  318.      as these, there are some combination categories which allow the
  319.      manipulation of more than one basic category at a time.  See the section
  320.      on _E_N_V_I_R_O_N_M_E_N_T for a discussion of these.
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. PPPPEEEERRRRLLLLLLLLOOOOCCCCAAAALLLLEEEE((((1111))))                                                    PPPPEEEERRRRLLLLLLLLOOOOCCCCAAAALLLLEEEE((((1111))))
  335.  
  336.  
  337.  
  338.      CCCCaaaatttteeeeggggoooorrrryyyy LLLLCCCC____CCCCOOOOLLLLLLLLAAAATTTTEEEE:::: CCCCoooollllllllaaaattttiiiioooonnnn
  339.  
  340.      When in the scope of use locale, Perl looks to the LC_COLLATE environment
  341.      variable to determine the application's notions on the collation
  342.      (ordering) of characters.  ('b' follows 'a' in Latin alphabets, but where
  343.      do 'a' and 'aa' belong?)
  344.  
  345.      Here is a code snippet that will tell you what are the alphanumeric
  346.      characters in the current locale, in the locale order:
  347.  
  348.              use locale;
  349.              print +(sort grep /\w/, map { chr() } 0..255), "\n";
  350.  
  351.      Compare this with the characters that you see and their order if you
  352.      state explicitly that the locale should be ignored:
  353.  
  354.              no locale;
  355.              print +(sort grep /\w/, map { chr() } 0..255), "\n";
  356.  
  357.      This machine-native collation (which is what you get unless use locale
  358.      has appeared earlier in the same block) must be used for sorting raw
  359.      binary data, whereas the locale-dependent collation of the first example
  360.      is useful for natural text.
  361.  
  362.      As noted in the section on _U_S_I_N_G _L_O_C_A_L_E_S, cmp compares according to the
  363.      current collation locale when use locale is in effect, but falls back to
  364.      a byte-by-byte comparison for strings which the locale says are equal.
  365.      You can use _P_O_S_I_X::_s_t_r_c_o_l_l() if you don't want this fall-back:
  366.  
  367.              use POSIX qw(strcoll);
  368.              $equal_in_locale =
  369.                  !strcoll("space and case ignored", "SpaceAndCaseIgnored");
  370.  
  371.      $equal_in_locale will be true if the collation locale specifies a
  372.      dictionary-like ordering which ignores space characters completely, and
  373.      which folds case.
  374.  
  375.      If you have a single string which you want to check for "equality in
  376.      locale" against several others, you might think you could gain a little
  377.      efficiency by using _P_O_S_I_X::_s_t_r_x_f_r_m() in conjunction with eq:
  378.  
  379.              use POSIX qw(strxfrm);
  380.              $xfrm_string = strxfrm("Mixed-case string");
  381.              print "locale collation ignores spaces\n"
  382.                  if $xfrm_string eq strxfrm("Mixed-casestring");
  383.              print "locale collation ignores hyphens\n"
  384.                  if $xfrm_string eq strxfrm("Mixedcase string");
  385.              print "locale collation ignores case\n"
  386.                  if $xfrm_string eq strxfrm("mixed-case string");
  387.  
  388.      _s_t_r_x_f_r_m() takes a string and maps it into a transformed string for use in
  389.      byte-by-byte comparisons against other transformed strings during
  390.  
  391.  
  392.  
  393.                                                                         PPPPaaaaggggeeee 6666
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400. PPPPEEEERRRRLLLLLLLLOOOOCCCCAAAALLLLEEEE((((1111))))                                                    PPPPEEEERRRRLLLLLLLLOOOOCCCCAAAALLLLEEEE((((1111))))
  401.  
  402.  
  403.  
  404.      collation.  "Under the hood", locale-affected Perl comparison operators
  405.      call _s_t_r_x_f_r_m() for both their operands, then do a byte-by-byte comparison
  406.      of the transformed strings.  By calling _s_t_r_x_f_r_m() explicitly, and using a
  407.      non locale-affected comparison, the example attempts to save a couple of
  408.      transformations.  In fact, it doesn't save anything: Perl magic (see the
  409.      section on _M_a_g_i_c _V_a_r_i_a_b_l_e_s in the _p_e_r_l_g_u_t_s manpage) creates the
  410.      transformed version of a string the first time it's needed in a
  411.      comparison, then keeps it around in case it's needed again.  An example
  412.      rewritten the easy way with cmp runs just about as fast.  It also copes
  413.      with null characters embedded in strings; if you call _s_t_r_x_f_r_m() directly,
  414.      it treats the first null it finds as a terminator.  And don't expect the
  415.      transformed strings it produces to be portable across systems - or even
  416.      from one revision of your operating system to the next.  In short, don't
  417.      call _s_t_r_x_f_r_m() directly: let Perl do it for you.
  418.  
  419.      Note: use locale isn't shown in some of these examples, as it isn't
  420.      needed: _s_t_r_c_o_l_l() and _s_t_r_x_f_r_m() exist only to generate locale-dependent
  421.      results, and so always obey the current LC_COLLATE locale.
  422.  
  423.      CCCCaaaatttteeeeggggoooorrrryyyy LLLLCCCC____CCCCTTTTYYYYPPPPEEEE:::: CCCChhhhaaaarrrraaaacccctttteeeerrrr TTTTyyyyppppeeeessss
  424.  
  425.      When in the scope of use locale, Perl obeys the LC_CTYPE locale setting.
  426.      This controls the application's notion of which characters are
  427.      alphabetic.  This affects Perl's \w regular expression metanotation,
  428.      which stands for alphanumeric characters - that is, alphabetic and
  429.      numeric characters.  (Consult the _p_e_r_l_r_e manpage for more information
  430.      about regular expressions.)  Thanks to LC_CTYPE, depending on your locale
  431.      setting, characters like 'ae', 'd`', 'ss', and 'o' may be understood as \w
  432.      characters.
  433.  
  434.      The LC_CTYPE locale also provides the map used in translating characters
  435.      between lower and uppercase.  This affects the case-mapping functions -
  436.      _l_c(), lcfirst, _u_c() and _u_c_f_i_r_s_t(); case-mapping interpolation with \l,
  437.      \L, \u or <\U> in double-quoted strings and in s/// substitutions; and
  438.      case-independent regular expression pattern matching using the i
  439.      modifier.
  440.  
  441.      Finally, LC_CTYPE affects the POSIX character-class test functions -
  442.      _i_s_a_l_p_h_a(), _i_s_l_o_w_e_r() and so on.  For example, if you move from the "C"
  443.      locale to a 7-bit Scandinavian one, you may find - possibly to your
  444.      surprise - that "|" moves from the _i_s_p_u_n_c_t() class to _i_s_a_l_p_h_a().
  445.  
  446.      NNNNooootttteeee:::: A broken or malicious LC_CTYPE locale definition may result in
  447.      clearly ineligible characters being considered to be alphanumeric by your
  448.      application.  For strict matching of (unaccented) letters and digits -
  449.      for example, in command strings - locale-aware applications should use \w
  450.      inside a no locale block.  See the section on _S_E_C_U_R_I_T_Y.
  451.  
  452.      CCCCaaaatttteeeeggggoooorrrryyyy LLLLCCCC____NNNNUUUUMMMMEEEERRRRIIIICCCC:::: NNNNuuuummmmeeeerrrriiiicccc FFFFoooorrrrmmmmaaaattttttttiiiinnnngggg
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.                                                                         PPPPaaaaggggeeee 7777
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466. PPPPEEEERRRRLLLLLLLLOOOOCCCCAAAALLLLEEEE((((1111))))                                                    PPPPEEEERRRRLLLLLLLLOOOOCCCCAAAALLLLEEEE((((1111))))
  467.  
  468.  
  469.  
  470.      When in the scope of use locale, Perl obeys the LC_NUMERIC locale
  471.      information, which controls application's idea of how numbers should be
  472.      formatted for human readability by the _p_r_i_n_t_f(), _s_p_r_i_n_t_f(), and _w_r_i_t_e()
  473.      functions.  String to numeric conversion by the _P_O_S_I_X::_s_t_r_t_o_d() function
  474.      is also affected.  In most implementations the only effect is to change
  475.      the character used for the decimal point - perhaps from '.'  to ',':
  476.      these functions aren't aware of such niceties as thousands separation and
  477.      so on.  (See the section on _T_h_e _l_o_c_a_l_e_c_o_n_v _f_u_n_c_t_i_o_n if you care about
  478.      these things.)
  479.  
  480.      Note that output produced by _p_r_i_n_t() is nnnneeeevvvveeeerrrr affected by the current
  481.      locale: it is independent of whether use locale or no locale is in
  482.      effect, and corresponds to what you'd get from _p_r_i_n_t_f() in the "C"
  483.      locale.  The same is true for Perl's internal conversions between numeric
  484.      and string formats:
  485.  
  486.              use POSIX qw(strtod);
  487.              use locale;
  488.  
  489.              $n = 5/2;   # Assign numeric 2.5 to $n
  490.  
  491.              $a = " $n"; # Locale-independent conversion to string
  492.  
  493.              print "half five is $n\n";       # Locale-independent output
  494.  
  495.              printf "half five is %g\n", $n;  # Locale-dependent output
  496.  
  497.              print "DECIMAL POINT IS COMMA\n"
  498.                  if $n == (strtod("2,5"))[0]; # Locale-dependent conversion
  499.  
  500.  
  501.      CCCCaaaatttteeeeggggoooorrrryyyy LLLLCCCC____MMMMOOOONNNNEEEETTTTAAAARRRRYYYY:::: FFFFoooorrrrmmmmaaaattttttttiiiinnnngggg ooooffff mmmmoooonnnneeeettttaaaarrrryyyy aaaammmmoooouuuunnnnttttssss
  502.  
  503.      The C standard defines the LC_MONETARY category, but no function that is
  504.      affected by its contents.  (Those with experience of standards committees
  505.      will recognize that the working group decided to punt on the issue.)
  506.      Consequently, Perl takes no notice of it.  If you really want to use
  507.      LC_MONETARY, you can query its contents - see the section on _T_h_e
  508.      _l_o_c_a_l_e_c_o_n_v _f_u_n_c_t_i_o_n - and use the information that it returns in your
  509.      application's own formatting of currency amounts.  However, you may well
  510.      find that the information, though voluminous and complex, does not quite
  511.      meet your requirements: currency formatting is a hard nut to crack.
  512.  
  513.      LLLLCCCC____TTTTIIIIMMMMEEEE
  514.  
  515.      The output produced by _P_O_S_I_X::_s_t_r_f_t_i_m_e(), which builds a formatted
  516.      human-readable date/time string, is affected by the current LC_TIME
  517.      locale.  Thus, in a French locale, the output produced by the %B format
  518.      element (full month name) for the first month of the year would be
  519.      "janvier".  Here's how to get a list of the long month names in the
  520.      current locale:
  521.  
  522.  
  523.  
  524.  
  525.                                                                         PPPPaaaaggggeeee 8888
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532. PPPPEEEERRRRLLLLLLLLOOOOCCCCAAAALLLLEEEE((((1111))))                                                    PPPPEEEERRRRLLLLLLLLOOOOCCCCAAAALLLLEEEE((((1111))))
  533.  
  534.  
  535.  
  536.              use POSIX qw(strftime);
  537.              for (0..11) {
  538.                  $long_month_name[$_] =
  539.                      strftime("%B", 0, 0, 0, 1, $_, 96);
  540.              }
  541.  
  542.      Note: use locale isn't needed in this example: as a function which exists
  543.      only to generate locale-dependent results, _s_t_r_f_t_i_m_e() always obeys the
  544.      current LC_TIME locale.
  545.  
  546.      OOOOtttthhhheeeerrrr ccccaaaatttteeeeggggoooorrrriiiieeeessss
  547.  
  548.      The remaining locale category, LC_MESSAGES (possibly supplemented by
  549.      others in particular implementations) is not currently used by Perl -
  550.      except possibly to affect the behavior of library functions called by
  551.      extensions which are not part of the standard Perl distribution.
  552.  
  553. SSSSEEEECCCCUUUURRRRIIIITTTTYYYY
  554.      While the main discussion of Perl security issues can be found in the
  555.      _p_e_r_l_s_e_c manpage, a discussion of Perl's locale handling would be
  556.      incomplete if it did not draw your attention to locale-dependent security
  557.      issues.  Locales - particularly on systems which allow unprivileged users
  558.      to build their own locales - are untrustworthy.  A malicious (or just
  559.      plain broken) locale can make a locale-aware application give unexpected
  560.      results.  Here are a few possibilities:
  561.  
  562.      +o   Regular expression checks for safe file names or mail addresses using
  563.          \w may be spoofed by an LC_CTYPE locale which claims that characters
  564.          such as ">" and "|" are alphanumeric.
  565.  
  566.      +o   String interpolation with case-mapping, as in, say, $dest =
  567.          "C:\U$name.$ext", may produce dangerous results if a bogus LC_CTYPE
  568.          case-mapping table is in effect.
  569.  
  570.      +o   If the decimal point character in the LC_NUMERIC locale is
  571.          surreptitiously changed from a dot to a comma, sprintf("%g",
  572.          0.123456e3) produces a string result of "123,456". Many people would
  573.          interpret this as one hundred and twenty-three thousand, four hundred
  574.          and fifty-six.
  575.  
  576.      +o   A sneaky LC_COLLATE locale could result in the names of students with
  577.          "D" grades appearing ahead of those with "A"s.
  578.  
  579.      +o   An application which takes the trouble to use the information in
  580.          LC_MONETARY may format debits as if they were credits and vice versa
  581.          if that locale has been subverted.  Or it make may make payments in
  582.          US dollars instead of Hong Kong dollars.
  583.  
  584.      +o   The date and day names in dates formatted by _s_t_r_f_t_i_m_e() could be
  585.          manipulated to advantage by a malicious user able to subvert the
  586.          LC_DATE locale.  ("Look - it says I wasn't in the building on
  587.          Sunday.")
  588.  
  589.  
  590.  
  591.                                                                         PPPPaaaaggggeeee 9999
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598. PPPPEEEERRRRLLLLLLLLOOOOCCCCAAAALLLLEEEE((((1111))))                                                    PPPPEEEERRRRLLLLLLLLOOOOCCCCAAAALLLLEEEE((((1111))))
  599.  
  600.  
  601.  
  602.      Such dangers are not peculiar to the locale system: any aspect of an
  603.      application's environment which may maliciously be modified presents
  604.      similar challenges.  Similarly, they are not specific to Perl: any
  605.      programming language which allows you to write programs which take
  606.      account of their environment exposes you to these issues.
  607.  
  608.      Perl cannot protect you from all of the possibilities shown in the
  609.      examples - there is no substitute for your own vigilance - but, when use
  610.      locale is in effect, Perl uses the tainting mechanism (see the _p_e_r_l_s_e_c
  611.      manpage) to mark string results which become locale-dependent, and which
  612.      may be untrustworthy in consequence.  Here is a summary of the tainting
  613.      behavior of operators and functions which may be affected by the locale:
  614.  
  615.      CCCCoooommmmppppaaaarrrriiiissssoooonnnn ooooppppeeeerrrraaaattttoooorrrrssss (lt, le, ge, gt and cmp):
  616.          Scalar true/false (or less/equal/greater) result is never tainted.
  617.  
  618.      CCCCaaaasssseeee----mmmmaaaappppppppiiiinnnngggg iiiinnnntttteeeerrrrppppoooollllaaaattttiiiioooonnnn (with \l, \L, \u or <\U>)
  619.          Result string containing interpolated material is tainted if use
  620.          locale is in effect.
  621.  
  622.      MMMMaaaattttcccchhhhiiiinnnngggg ooooppppeeeerrrraaaattttoooorrrr (m//):
  623.          Scalar true/false result never tainted.
  624.  
  625.          Subpatterns, either delivered as an array-context result, or as $1
  626.          etc.  are tainted if use locale is in effect, and the subpattern
  627.          regular expression contains \w (to match an alphanumeric character),
  628.          \W (non-alphanumeric character), \s (white-space character), or \S
  629.          (non white-space character).  The matched pattern variable, $&, $`
  630.          (pre-match), $' (post-match), and $+ (last match) are also tainted if
  631.          use locale is in effect and the regular expression contains \w, \W,
  632.          \s, or \S.
  633.  
  634.      SSSSuuuubbbbssssttttiiiittttuuuuttttiiiioooonnnn ooooppppeeeerrrraaaattttoooorrrr (s///):
  635.          Has the same behavior as the match operator.  Also, the left operand
  636.          of =~ becomes tainted when use locale in effect, if it is modified as
  637.          a result of a substitution based on a regular expression match
  638.          involving \w, \W, \s, or \S; or of case-mapping with \l, \L,\u or
  639.          <\U>.
  640.  
  641.      IIIInnnn----mmmmeeeemmmmoooorrrryyyy ffffoooorrrrmmmmaaaattttttttiiiinnnngggg ffffuuuunnnnccccttttiiiioooonnnn (sprintf()):
  642.          Result is tainted if "use locale" is in effect.
  643.  
  644.      OOOOuuuuttttppppuuuutttt ffffoooorrrrmmmmaaaattttttttiiiinnnngggg ffffuuuunnnnccccttttiiiioooonnnnssss (printf() and write()):
  645.          Success/failure result is never tainted.
  646.  
  647.      CCCCaaaasssseeee----mmmmaaaappppppppiiiinnnngggg ffffuuuunnnnccccttttiiiioooonnnnssss (lc(), lcfirst(), uc(), ucfirst()):
  648.          Results are tainted if use locale is in effect.
  649.  
  650. strxfrm()):
  651.      PPPPOOOOSSSSIIIIXXXX llllooooccccaaaalllleeee----ddddeeeeppppeeeennnnddddeeeennnntttt ffffuuuunnnnccccttttiiiioooonnnnssss (localeconv(), strcoll(), strftime(),
  652.          Results are never tainted.
  653.  
  654.  
  655.  
  656.  
  657.                                                                        PPPPaaaaggggeeee 11110000
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664. PPPPEEEERRRRLLLLLLLLOOOOCCCCAAAALLLLEEEE((((1111))))                                                    PPPPEEEERRRRLLLLLLLLOOOOCCCCAAAALLLLEEEE((((1111))))
  665.  
  666.  
  667.  
  668. islower(), isprint(), ispunct(), isspace(), isupper(), isxdigit()):
  669.      PPPPOOOOSSSSIIIIXXXX cccchhhhaaaarrrraaaacccctttteeeerrrr ccccllllaaaassssssss tttteeeessssttttssss (isalnum(), isalpha(), isdigit(), isgraph(),
  670.          True/false results are never tainted.
  671.  
  672.      Three examples illustrate locale-dependent tainting.  The first program,
  673.      which ignores its locale, won't run: a value taken directly from the
  674.      command line may not be used to name an output file when taint checks are
  675.      enabled.
  676.  
  677.              #/usr/local/bin/perl -T
  678.              # Run with taint checking
  679.  
  680.              # Command line sanity check omitted...
  681.              $tainted_output_file = shift;
  682.  
  683.              open(F, ">$tainted_output_file")
  684.                  or warn "Open of $untainted_output_file failed: $!\n";
  685.  
  686.      The program can be made to run by "laundering" the tainted value through
  687.      a regular expression: the second example - which still ignores locale
  688.      information - runs, creating the file named on its command line if it
  689.      can.
  690.  
  691.              #/usr/local/bin/perl -T
  692.  
  693.              $tainted_output_file = shift;
  694.              $tainted_output_file =~ m%[\w/]+%;
  695.              $untainted_output_file = $&;
  696.  
  697.              open(F, ">$untainted_output_file")
  698.                  or warn "Open of $untainted_output_file failed: $!\n";
  699.  
  700.      Compare this with a very similar program which is locale-aware:
  701.  
  702.              #/usr/local/bin/perl -T
  703.  
  704.              $tainted_output_file = shift;
  705.              use locale;
  706.              $tainted_output_file =~ m%[\w/]+%;
  707.              $localized_output_file = $&;
  708.  
  709.              open(F, ">$localized_output_file")
  710.                  or warn "Open of $localized_output_file failed: $!\n";
  711.  
  712.      This third program fails to run because $& is tainted: it is the result
  713.      of a match involving \w when use locale is in effect.
  714.  
  715. EEEENNNNVVVVIIIIRRRROOOONNNNMMMMEEEENNNNTTTT
  716.      PERL_BADLANG
  717.                  A string that can suppress Perl's warning about failed locale
  718.                  settings at startup.  Failure can occur if the locale support
  719.                  in the operating system is lacking (broken) is some way - or
  720.  
  721.  
  722.  
  723.                                                                        PPPPaaaaggggeeee 11111111
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730. PPPPEEEERRRRLLLLLLLLOOOOCCCCAAAALLLLEEEE((((1111))))                                                    PPPPEEEERRRRLLLLLLLLOOOOCCCCAAAALLLLEEEE((((1111))))
  731.  
  732.  
  733.  
  734.                  if you mistyped the name of a locale when you set up your
  735.                  environment.  If this environment variable is absent, or has
  736.                  a value which does not evaluate to integer zero - that is "0"
  737.                  or "" - Perl will complain about locale setting failures.
  738.  
  739.                  NNNNOOOOTTTTEEEE: PERL_BADLANG only gives you a way to hide the warning
  740.                  message.  The message tells about some problem in your
  741.                  system's locale support, and you should investigate what the
  742.                  problem is.
  743.  
  744.      The following environment variables are not specific to Perl: They are
  745.      part of the standardized (ISO C, XPG4, POSIX 1.c) _s_e_t_l_o_c_a_l_e() method for
  746.      controlling an application's opinion on data.
  747.  
  748.      LC_ALL      LC_ALL is the "override-all" locale environment variable. If
  749.                  it is set, it overrides all the rest of the locale
  750.                  environment variables.
  751.  
  752.      LC_CTYPE    In the absence of LC_ALL, LC_CTYPE chooses the character type
  753.                  locale.  In the absence of both LC_ALL and LC_CTYPE, LANG
  754.                  chooses the character type locale.
  755.  
  756.      LC_COLLATE  In the absence of LC_ALL, LC_COLLATE chooses the collation
  757.                  (sorting) locale.  In the absence of both LC_ALL and
  758.                  LC_COLLATE, LANG chooses the collation locale.
  759.  
  760.      LC_MONETARY In the absence of LC_ALL, LC_MONETARY chooses the monetary
  761.                  formatting locale.  In the absence of both LC_ALL and
  762.                  LC_MONETARY, LANG chooses the monetary formatting locale.
  763.  
  764.      LC_NUMERIC  In the absence of LC_ALL, LC_NUMERIC chooses the numeric
  765.                  format locale.  In the absence of both LC_ALL and LC_NUMERIC,
  766.                  LANG chooses the numeric format.
  767.  
  768.      LC_TIME     In the absence of LC_ALL, LC_TIME chooses the date and time
  769.                  formatting locale.  In the absence of both LC_ALL and
  770.                  LC_TIME, LANG chooses the date and time formatting locale.
  771.  
  772.      LANG        LANG is the "catch-all" locale environment variable. If it is
  773.                  set, it is used as the last resort after the overall LC_ALL
  774.                  and the category-specific LC_....
  775.  
  776. NNNNOOOOTTTTEEEESSSS
  777.      BBBBaaaacccckkkkwwwwaaaarrrrdddd ccccoooommmmppppaaaattttiiiibbbbiiiilllliiiittttyyyy
  778.  
  779.      Versions of Perl prior to 5.004 mmmmoooossssttttllllyyyy ignored locale information,
  780.      generally behaving as if something similar to the "C" locale (see the
  781.      section on _T_h_e _s_e_t_l_o_c_a_l_e _f_u_n_c_t_i_o_n) was always in force, even if the
  782.      program environment suggested otherwise.  By default, Perl still behaves
  783.      this way so as to maintain backward compatibility.  If you want a Perl
  784.      application to pay attention to locale information, you mmmmuuuusssstttt use the use
  785.      locale pragma (see the section on _T_h_e _u_s_e _l_o_c_a_l_e _P_r_a_g_m_a) to instruct it
  786.  
  787.  
  788.  
  789.                                                                        PPPPaaaaggggeeee 11112222
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796. PPPPEEEERRRRLLLLLLLLOOOOCCCCAAAALLLLEEEE((((1111))))                                                    PPPPEEEERRRRLLLLLLLLOOOOCCCCAAAALLLLEEEE((((1111))))
  797.  
  798.  
  799.  
  800.      to do so.
  801.  
  802.      Versions of Perl from 5.002 to 5.003 did use the LC_CTYPE information if
  803.      that was available, that is, \w did understand what are the letters
  804.      according to the locale environment variables.  The problem was that the
  805.      user had no control over the feature:  if the C library supported
  806.      locales, Perl used them.
  807.  
  808.      IIII11118888NNNN::::CCCCoooollllllllaaaatttteeee oooobbbbssssoooolllleeeetttteeee
  809.  
  810.      In versions of Perl prior to 5.004 per-locale collation was possible
  811.      using the I18N::Collate library module.  This module is now mildly
  812.      obsolete and should be avoided in new applications.  The LC_COLLATE
  813.      functionality is now integrated into the Perl core language: One can use
  814.      locale-specific scalar data completely normally with use locale, so there
  815.      is no longer any need to juggle with the scalar references of
  816.      I18N::Collate.
  817.  
  818.      SSSSoooorrrrtttt ssssppppeeeeeeeedddd aaaannnndddd mmmmeeeemmmmoooorrrryyyy uuuusssseeee iiiimmmmppppaaaaccccttttssss
  819.  
  820.      Comparing and sorting by locale is usually slower than the default
  821.      sorting; slow-downs of two to four times have been observed.  It will
  822.      also consume more memory: once a Perl scalar variable has participated in
  823.      any string comparison or sorting operation obeying the locale collation
  824.      rules, it will take 3-15 times more memory than before.  (The exact
  825.      multiplier depends on the string's contents, the operating system and the
  826.      locale.) These downsides are dictated more by the operating system's
  827.      implementation of the locale system than by Perl.
  828.  
  829.      _w_r_i_t_e() and LC_NUMERIC
  830.  
  831.      Formats are the only part of Perl which unconditionally use information
  832.      from a program's locale; if a program's environment specifies an
  833.      LC_NUMERIC locale, it is always used to specify the decimal point
  834.      character in formatted output.  Formatted output cannot be controlled by
  835.      use locale because the pragma is tied to the block structure of the
  836.      program, and, for historical reasons, formats exist outside that block
  837.      structure.
  838.  
  839.      FFFFrrrreeeeeeeellllyyyy aaaavvvvaaaaiiiillllaaaabbbblllleeee llllooooccccaaaalllleeee ddddeeeeffffiiiinnnniiiittttiiiioooonnnnssss
  840.  
  841.      There is a large collection of locale definitions at
  842.      ftp://dkuug.dk/i18n/WG15-collection.  You should be aware that it is
  843.      unsupported, and is not claimed to be fit for any purpose.  If your
  844.      system allows the installation of arbitrary locales, you may find the
  845.      definitions useful as they are, or as a basis for the development of your
  846.      own locales.
  847.  
  848.      IIII11118888nnnn aaaannnndddd llll11110000nnnn
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.                                                                        PPPPaaaaggggeeee 11113333
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862. PPPPEEEERRRRLLLLLLLLOOOOCCCCAAAALLLLEEEE((((1111))))                                                    PPPPEEEERRRRLLLLLLLLOOOOCCCCAAAALLLLEEEE((((1111))))
  863.  
  864.  
  865.  
  866.      "Internationalization" is often abbreviated as iiii11118888nnnn because its first and
  867.      last letters are separated by eighteen others.  (You may guess why the
  868.      internalin ... internaliti ... i18n tends to get abbreviated.)  In the
  869.      same way, "localization" is often abbreviated to llll11110000nnnn.
  870.  
  871.      AAAAnnnn iiiimmmmppppeeeerrrrffffeeeecccctttt ssssttttaaaannnnddddaaaarrrrdddd
  872.  
  873.      Internationalization, as defined in the C and POSIX standards, can be
  874.      criticized as incomplete, ungainly, and having too large a granularity.
  875.      (Locales apply to a whole process, when it would arguably be more useful
  876.      to have them apply to a single thread, window group, or whatever.)  They
  877.      also have a tendency, like standards groups, to divide the world into
  878.      nations, when we all know that the world can equally well be divided into
  879.      bankers, bikers, gamers, and so on.  But, for now, it's the only standard
  880.      we've got.  This may be construed as a bug.
  881.  
  882. BBBBUUUUGGGGSSSS
  883.      BBBBrrrrooookkkkeeeennnn ssssyyyysssstttteeeemmmmssss
  884.  
  885.      In certain system environments the operating system's locale support is
  886.      broken and cannot be fixed or used by Perl.  Such deficiencies can and
  887.      will result in mysterious hangs and/or Perl core dumps when the use
  888.      locale is in effect.  When confronted with such a system, please report
  889.      in excruciating detail to <_p_e_r_l_b_u_g@_p_e_r_l._c_o_m>, and complain to your
  890.      vendor: maybe some bug fixes exist for these problems in your operating
  891.      system.  Sometimes such bug fixes are called an operating system upgrade.
  892.  
  893. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  894.      the isalnum entry in the _P_O_S_I_X (_3) manpage, the isalpha entry in the
  895.      _P_O_S_I_X (_3) manpage, the isdigit entry in the _P_O_S_I_X (_3) manpage, the
  896.      isgraph entry in the _P_O_S_I_X (_3) manpage, the islower entry in the _P_O_S_I_X
  897.      (_3) manpage, the isprint entry in the _P_O_S_I_X (_3) manpage, the ispunct
  898.      entry in the _P_O_S_I_X (_3) manpage, the isspace entry in the _P_O_S_I_X (_3)
  899.      manpage, the isupper entry in the _P_O_S_I_X (_3) manpage, the isxdigit entry
  900.      in the _P_O_S_I_X (_3) manpage, the localeconv entry in the _P_O_S_I_X (_3) manpage,
  901.      the setlocale entry in the _P_O_S_I_X (_3) manpage, the strcoll entry in the
  902.      _P_O_S_I_X (_3) manpage, the strftime entry in the _P_O_S_I_X (_3) manpage, the
  903.      strtod entry in the _P_O_S_I_X (_3) manpage, the strxfrm entry in the _P_O_S_I_X (_3)
  904.      manpage
  905.  
  906. HHHHIIIISSSSTTTTOOOORRRRYYYY
  907.      Jarkko Hietaniemi's original _p_e_r_l_i_1_8_n._p_o_d heavily hacked by Dominic
  908.      Dunlop, assisted by the perl5-porters.
  909.  
  910.      Last update: Wed Jan 22 11:04:58 EST 1997
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.                                                                        PPPPaaaaggggeeee 11114444
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928. PPPPEEEERRRRLLLLLLLLOOOOCCCCAAAALLLLEEEE((((1111))))                                                    PPPPEEEERRRRLLLLLLLLOOOOCCCCAAAALLLLEEEE((((1111))))
  929.  
  930.  
  931.  
  932.  
  933.  
  934.  
  935.  
  936.  
  937.  
  938.  
  939.  
  940.  
  941.  
  942.  
  943.  
  944.  
  945.  
  946.  
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954.  
  955.  
  956.  
  957.  
  958.  
  959.  
  960.  
  961.  
  962.  
  963.  
  964.  
  965.  
  966.  
  967.  
  968.  
  969.  
  970.  
  971.  
  972.  
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.                                                                        PPPPaaaaggggeeee 11115555
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.